﻿using System;
using System.Collections.Generic;
using System.Text;
using System.Data;

using XianShang.Data;
using XianShang.Common;
using XianShang.Entity;
using XianShang.Data.DataProvider;
namespace XianShang.Data.DataProvider
{
    public class Proced
    {
         /// <summary>
        /// 取得下載類表前35條記錄
        /// </summary>
        /// <returns></returns>
        public static DataSet GetSoftWareProcAndVerTop35Rows()
        {
            return DatabaseProvider.GetInstance().GetSoftWareProcAndVerTop35Rows();
        }
        /// <summary>
        /// 根據下載主表ID取得下載類表
        /// </summary>
        /// <returns></returns>
        public static DataSet GetSoftWareProcAndVerById(string id)
        {
            return DatabaseProvider.GetInstance().GetSoftWareProcAndVerById(id);
        }
        /// <summary>
        /// 增加一條程序版本類別信息
        /// </summary>
        /// <param name="user"></param>
        /// <returns></returns>
        public static int AddVersionInfo(SoftwareVerInfo Verinfo)
        {
            return DatabaseProvider.GetInstance().AddVersionInfo(Verinfo);
        }


        /// <summary>
        ///  增加一條程序下載信息(語言不為空時)
        /// </summary>
        /// <param name="user"></param>
        /// <returns></returns>
        public static int AddProcedInfo(SoftwareDownInfo Procfo)
        {
            return DatabaseProvider.GetInstance().AddProcedInfo(Procfo);
        }

        /// <summary>
        ///  增加一條程序下載信息(語言為空時)
        /// </summary>
        /// <param name="user"></param>
        /// <returns></returns>
        public static int AddProcedInfo1(SoftwareDownInfo Procfo)
        {
            return DatabaseProvider.GetInstance().AddProcedInfo1(Procfo);
        }

        /// <summary>
        /// 獲取信息顯示程序版本類別列表
        /// </summary>
        /// <returns></returns>
        public static DataSet GetVersionInfo()
        {
            return DatabaseProvider.GetInstance().GetVersionInfo();
        }

        /// <summary>
        /// 獲取信息綁定程序版本類別
        /// </summary>
        /// <returns></returns>
        public static DataSet BindVersionInfo()
        {
            return DatabaseProvider.GetInstance().BindVersionInfo();
        }

        /// <summary>
        /// 獲取信息顯示程序下載列表
        /// </summary>
        /// <returns></returns>
        public static DataSet GetProcedInfo()
        {
            return DatabaseProvider.GetInstance().GetProcedInfo();
        }

        /// <summary>
        ///  根據類別id顯示相應的類別名稱
        /// </summary>
        /// <returns></returns>
        public static SoftwareVerInfo GetVersionName(string Id)
        {
            return DatabaseProvider.GetInstance().GetVersionName(Id);
        }

        /// <summary>
        ///  獲取一條要修改的程序下載信息顯示
        /// </summary>
        /// <returns></returns>
        public static SoftwareDownInfo GetProcedId(string ProcId)
        {
            return DatabaseProvider.GetInstance().GetProcedId(ProcId);
        }

        /// <summary>
        /// 更新一條程序版本類別信息
        /// </summary>
        /// <param name="FileName"></param>
        /// <returns></returns>
        public static int UpVersionInfo(string FileName, string Xuhao, bool Show, string Id)
        {
            return DatabaseProvider.GetInstance().UpVersionInfo(FileName, Xuhao, Show, Id);
        }

        /// <summary>
        /// 更新一條要修改的程序下载信息(语言为空)
        /// </summary>
        /// <param name="FileName"></param>
        /// <returns></returns>
        public static int UpProcedInfo(int VerType, string Version, string Md5, string Conent, string DownUrl1, string DownUrl2, string Time, bool IsDown, string Id)
        {
            return DatabaseProvider.GetInstance().UpProcedInfo(VerType, Version, Md5, Conent, DownUrl1, DownUrl2, Time, IsDown, Id);
        }

        /// <summary>
        /// 更新一條要修改的程序下载信息(语言不为空)
        /// </summary>
        /// <param name="FileName"></param>
        /// <returns></returns>
        public static int UpProcedInfo1(int VerType, string Language, string Version, string Md5, string Conent, string DownUrl1, string DownUrl2, string Time, bool IsDown, string Id)
        {
            return DatabaseProvider.GetInstance().UpProcedInfo1(VerType, Language, Version, Md5, Conent, DownUrl1, DownUrl2, Time, IsDown, Id);
        }

        /// <summary>
        /// 更新設置是否提供程序下載
        /// </summary>
        /// <param name="FileName"></param>
        /// <returns></returns>
        public static int UpIsProc(bool IsDown, string Id)
        {
            return DatabaseProvider.GetInstance().UpIsProc(IsDown, Id);
        }

        /// <summary>
        /// 根據程序版本類別ID刪除版本信息
        /// </summary>
        /// <returns></returns>
        public static int DelVersionInfo(string Id)
        {
            return DatabaseProvider.GetInstance().DelVersionInfo(Id);
        }

        /// <summary>
        /// 根據程序版本類別ID刪除程序信息
        /// </summary>
        /// <returns></returns>
        public static int DelProcedInfo(string Id)
        {
            return DatabaseProvider.GetInstance().DelProcedInfo(Id);
        }

        /// <summary>
        ///根據下載id刪除程序下載信息
        /// </summary>
        /// <returns></returns>
        public static int DelProcedId(string Id)
        {
            return DatabaseProvider.GetInstance().DelProcedId(Id);
        }


       
    }
}
